Interface Work: Stealth Button

Interface Work: Stealth Button

Thu Sep 26 2024
I built a "stealth" button for nomad hypertext.

Stealth button in action

Why

I get paranoid sometimes when I'm writing on my laptop in public, because it feels like people might be staring at me and what I'm writing. Usually this doesn't really matter, but if I'm journaling about something private, I do care.

When this feature is activated, it hides all the text on your screen behind red bars. You're still able to see how much you're typing and how much you're deleting, which is handy.

Thoughts

It was nice building a new feature for an app I haven't touched in a while. Still, it got me thinking about extensibility and composability.

One of the reasons I was excited to make Nomad Hypertext local first was the idea that by using simple text files, I'd be able to add more features to my notes, without working on Nomad Hypertext itself. For example, if I wanted summaries of my notes, I could build an entirely new summarizer app, that simply operates on the same files that Nomad Hypertext does.

However, in practice that's kind of hard. One challenge is that a lot of functionality that could in practice be reusable sometimes has to be coupled into application logic - an example of this is the semantic search in Nomad Hypertext. It would be great if my (hypothetical) summarizer app could list out the themes I was writing about this week, and there was a modal where you could use semantic search to find all other instances in my notes where I've written about that theme. It would be even greater if I didn't have to rewrite all this from scratch. Unfortunately, since semantic search is baked into Nomad Hypertext as an application, not a separate service, I can't reuse that functionality super easily in another app.

I bring this up because it would be nice if there were a way to "compose" UI features the same way you can compose command line features. Imagine if I had been able to add a stealth button to my app without editing my app, but by building a new app that I then composed my app with. There are lots of other UI elements I'd like to add to my app - maybe a button that pushes all my notes up to Github, for example.